﻿namespace Home.Security.Authentication
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    public abstract class AuthenticationResult
    {
        private readonly Dictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

        protected AuthenticationResult(Guid id, Guid trackId, AuthenticationType type)
        {
            Debug.Assert(id != Guid.Empty);
            Debug.Assert(trackId != Guid.Empty);
            Debug.Assert(Enum.IsDefined(typeof(AuthenticationType), type));

            this.Id = id;
            this.TrackId = trackId;
            this.AuthenticationType = type;
        }

        public Guid Id { get; private set; }

        public Guid TrackId { get; private set; }

        public AuthenticationType AuthenticationType { get; private set; }

        public IDictionary<string,string> Properties
        {
            get { return this.properties; }
        }
    }
}
